package com.example.guiguihomemedical.mapper;

import com.example.guiguihomemedical.entity.Doctor;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface DoctorMapper {
    @Select("select * from doctor where username=#{username} and password=#{password}")
    Doctor findByUsernamePassword(Doctor doctor);

    @Select("select * from doctor where id=#{doctorId}")
    Doctor findByDoctorId(int doctorId);
    @Update("UPDATE doctor SET password = #{newPassword} WHERE id = #{doctorId} ")
    void ChangePassword(String newPassword,int doctorId);
}
